import request from "@/utils/request";

// 查询列表
export function listCost(query) {
  return request({
    url: "/system/costing/list",
    method: "get",
    params: query,
  });
}
//获取所有合同列表
export function listContract(query) {
  return request({
    url: "/system/contract/getAllContractList",
    method: "get",
    params: query,
  });
}
//通过合同和买卖方查询通知单
export function listNotice(query) {
  return request({
    url: "/system/contract/getContractInfoByNo",
    method: "get",
    params: query,
  });
}
//获取成本类别

export function costTypeList(query) {
  return request({
    url: "/system/costing/cosingList",
    method: "get",
    params: query,
  });
}
//添加成本
export function addCost(data) {
  return request({
    url: "/system/costing",
    method: "post",
    data,
  });
}
//查询成本
export function getCost(id) {
  return request({
    url: "/system/costing/" + id,
    method: "get",
  });
}
//修改成本

export function editCost(data) {
  return request({
    url: "/system/costing",
    method: "put",
    data,
  });
}
//删除成本
export function delCost(id) {
  return request({
    url: "/system/costing/" + id,
    method: "delete",
  });
}
//查询成本价
export function queryCostingPrice(data) {
  return request({
    url: "/system/costing/formulaCost",
    method: "post",
    data,
  });
}
